package guda.house.web.action.front;

import guda.grape.autogen.common.page.BizResult;
import guda.grape.util.RequestUtil;
import guda.house.biz.FrontFeeBiz;
import guda.house.biz.query.FrontFeeQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by well on 16/5/28.
 */
@Controller
@RequestMapping(value = "front")
public class PayLogListAction {

    @Autowired
    private FrontFeeBiz frontFeeBiz;

    @RequestMapping(value = "payLogList.htm", method = RequestMethod.GET)
    public String bindSuite(HttpServletRequest request, ModelMap modelMap) {
        int pageId = RequestUtil.getInt(request, "pageNo");
        int pageSize = RequestUtil.getInt(request, "pageSize");
        FrontFeeQuery frontFeeQuery = new FrontFeeQuery();
        frontFeeQuery.setPageSize(pageSize);
        frontFeeQuery.setPageNo(pageId);
        BizResult bizResult = frontFeeBiz.queryPaiedFee(frontFeeQuery);

        modelMap.putAll(bizResult.data);
        return "front/payLogList.vm";
    }
}
